<template>
  <div id="app">
    <VirtualList :size="40" :remain="8" :items="items" :variable="true">
      <template #items="item">
        <items :item="item"></items>
      </template>
    </VirtualList>
  </div>
</template>

<script>
import VirtualList from "@/components/virtual-list";

import Items from "./components/items.vue";

import Mock from 'mockjs'

let items = [];

for (let i = 0; i < 1000; i++) {
  items.push({ id: i, value: Mock.Random.sentence(100,200) });
}

export default {
  name: "App",
  data() {
    return { items };
  },
  components: {
    VirtualList,
    Items,
  },
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
